/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

html, body {
    height: 100%; /* Asegúrate de que el html y el body ocupen el 100% de la altura */
}

body {
    display: flex;
    flex-direction: column; /* Coloca los elementos en una columna */
    background-color: #ebf5fb;
}

/* Header */
header {
    background-color: #17415e;
    padding: 15px 0;
    color: white;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 140px;
    height: auto;
    border-radius: 5px;
}

h1 {
    font-size: 1.6rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Menú responsive */
.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
}

/* Navegación */
nav {
    display: flex;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

nav ul li {
    position: relative;
    transition: transform 0.3s ease;
}

nav ul li:hover {
    transform: translateY(-3px);
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s ease-in-out;
    padding: 10px 15px;
}

nav ul li a:hover {
    color: #ffcc00;
    text-shadow: 0px 0px 10px rgba(255, 204, 0, 0.8);
}

/* Sección de servicios */
.main-content {
    flex: 1; /* Permite que el contenido principal ocupe el espacio disponible */
}

#servicios {
    padding: 50px 20px;
    text-align: center;
}

#servicios h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

#servicios p {
    font-size: 1.1rem;
    margin: 15px 0;
    max-width: 80%;
    margin: 0 auto 30px; /* Centrar y dar espacio inferior */
}

/* Servicios Grid */
.servicios-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Permite que los servicios se ajusten en móviles */
}

.servicio {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 300px;
    transition: transform 0.3s ease;
}

.servicio:hover {
    transform: translateY(-5px);
}

.servicio-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Pie de página */
footer {
    background-color: #005f87;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: auto; /* Empuja el footer hacia abajo */
}

footer p {
    font-size: 0.9rem;
}

@media screen and (max-width: 480px) {
    header {
        padding: 10px 0;
    }

    h1 {
        font-size: 1.2rem;
    }

    footer p {
        font-size: 0.8rem;
    }
}

/* Mejoras para computadoras de escritorio grandes */
@media (min-width: 1200px) {
    .servicio {
        max-width: 300px; /* Aseguramos que los servicios mantengan su tamaño */
    }
}

/* Pantallas medianas (tablets, laptops) */
@media (max-width: 1199px) and (min-width: 768px) {
    .servicio {
        width: 80%; /* Ajustamos el ancho de los servicios */
    }
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #005f8b;
        position: absolute;
        top: 70px;
        left: 0;
        text-align: center;
        padding: 10px 0;
    }

    nav ul {
        flex-direction: column;
        padding: 0;
    }

    nav ul li {
        padding: 10px;
    }

    nav.active {
        display: flex;
    }

    .logo {
        width: 100px;
    }

    #hero h2 {
        font-size: 2rem;
    }

    #hero p {
        font-size: 1rem;
    }

    .servicio {
        width: 90%;
    }

    footer p {
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 10px 0;
    }

    h1 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    #hero {
        padding: 80px 20px;
    }

    #hero h2 {
        font-size: 1.8rem;
    }

    .servicio {
        width: 95%;
    }

    footer p {
        font-size: 0.7rem;
    }
}

/* Estilo para la sección de anuncios */
#anuncios {
    background-color: #f1f1f1;
    padding: 60px 0;
    margin-bottom: 40px;
}

#anuncios h2 {
    text-align: center;
    font-size: 2.5em;
    color: #333;
    margin-bottom: 50px; /* Más espacio debajo del título */
    font-family: 'Arial', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.container {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Aseguramos 5 columnas en todo momento */
    gap: 30px; /* Espaciado entre los anuncios */
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Ajuste de la anchura de los anuncios */
.anuncio {
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.anuncio:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.anuncio-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.anuncio img {
    width: 100%;
    height: 230px; /* Ajustamos la altura para que no esté tan grande */
    object-fit: cover;
    border-radius: 15px 15px 0 0; /* Solo las esquinas superiores redondeadas */
    transition: transform 0.3s ease;
}

.anuncio img:hover {
    transform: scale(1.05);
}

.anuncio-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.anuncio-info h3 {
    font-size: 1.8em;
    color: #007bff;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.anuncio-info p {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-anuncio {
    padding: 12px 24px;
    font-size: 1.1em;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    align-self: flex-start; /* Alineamos el botón a la izquierda */
}

.btn-anuncio:hover {
    background-color: #0056b3;
}

/* Mejoras para computadoras de escritorio grandes */
@media (min-width: 1200px) {
    .container {
        grid-template-columns: repeat(5, 1fr); /* Aseguramos que haya 5 columnas por fila */
        gap: 30px; /* Espaciado más amplio entre los anuncios */
    }

    .anuncio {
        width: 100%; /* Los anuncios ocupan todo el ancho disponible */
    }

    .anuncio img {
        height: 230px; /* Ajustamos la altura de los anuncios */
    }

    .anuncio-info {
        padding: 25px;
    }
}

/* Pantallas medianas (tablets, laptops) */
@media (max-width: 1199px) and (min-width: 768px) {
    .container {
        grid-template-columns: repeat(3, 1fr); /* 3 anuncios por fila */
        gap: 40px; /* Aumentamos el espacio entre los anuncios */
    }

    .anuncio img {
        height: 200px;
    }

    .anuncio-info {
        padding: 20px;
    }
}

/* Pantallas pequeñas (teléfonos móviles) */
@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr); /* 2 anuncios por fila */
        gap: 30px; /* Espaciado más amplio */
    }

    .anuncio img {
        height: 180px;
    }
}

/* Pantallas muy pequeñas (móviles muy pequeños) */
@media (max-width: 480px) {
    .container {
        grid-template-columns: 1fr; /* 1 anuncio por fila */
    }

    .anuncio img {
        height: 160px;
    }
}

body {
    transform: none !important;
    opacity: 1 !important;
}



/* RESPONSIVE DESIGN */
@media screen and (max-width: 1024px) {
    .container {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        width: 130px;
    }

    h1 {
        font-size: 1.5rem;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .servicio {
        width: 80%;
    }
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #005f8b;
        position: absolute;
        top: 70px;
        left: 0;
        text-align: center;
        padding: 10px 0;
    }

    nav ul {
        flex-direction: column;
        padding: 0;
    }

    nav ul li {
        padding: 10px;
    }

    nav.active {
        display: flex;
    }

    .logo {
        width: 100px;
    }

    #hero h2 {
        font-size: 2rem;
    }

    #hero p {
        font-size: 1rem;
    }

    .servicio {
        width: 90%;
    }

    footer p {
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 10px 0;
    }

    h1 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    #hero {
        padding: 80px 20px;
    }

    #hero h2 {
        font-size: 1.8rem;
    }

    .servicio {
        width: 95%;
    }

    footer p {
        font-size: 0.7rem;
    }
}


/* Mejoras para computadoras de escritorio grandes */
@media (min-width: 1200px) {
    .container {
        grid-template-columns: repeat(5, 1fr); /* Aseguramos que haya 5 columnas por fila */
        gap: 30px; /* Espaciado más amplio entre los anuncios */
    }

    .anuncio {
        width: 100%; /* Los anuncios ocupan todo el ancho disponible */
    }

    .anuncio img {
        height: 230px; /* Ajustamos la altura de los anuncios */
    }

    .anuncio-info {
        padding: 25px;
    }
}

/* Pantallas medianas (tablets, laptops) */
@media (max-width: 1199px) and (min-width: 768px) {
    .container {
        grid-template-columns: repeat(3, 1fr); /* 3 anuncios por fila */
        gap: 40px; /* Aumentamos el espacio entre los anuncios */
    }

    .anuncio img {
        height: 200px;
    }

    .anuncio-info {
        padding: 20px;
    }
}

/* Pantallas pequeñas (teléfonos móviles) */
@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr); /* 2 anuncios por fila */
        gap: 30px; /* Espaciado más amplio */
    }

    .anuncio img {
        height: 180px;
    }
}

/* Pantallas muy pequeñas (móviles muy pequeños) */
@media (max-width: 480px) {
    .container {
        grid-template-columns: 1fr; /* 1 anuncio por fila */
    }

    .anuncio img {
        height: 160px;
    }
}


body {
    transform: none !important;
    opacity: 1 !important;
}

